﻿@{
    Layout = "~/Views/Shared/_LayoutForCenterBox.cshtml";
    ViewBag.Title = "用户登录";
    var returnUrl = ViewBag.ReturnUrl != null ? ViewBag.ReturnUrl : "/";
}

@section scripts{

    <script src="~/Content/default/js/loginSingle.js"></script>

}

<div ng-controller="singleCtrl" id="loginSingleApp">

    <input type="hidden" ng-init="myreturnUrl='@returnUrl'" />

    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="text-center">用户登录</h3>
            </div>
            <div class="modal-body">
                <form method="post" class="form-horizontal" name="loginForm">
                    <fieldset>

                        <div class="form-group">
                            <label for="IdentityName" class="col-xs-2 control-label">帐号</label>
                            <div class="col-xs-6">
                                <input type="text" value="" placeholder="帐号/Email" name="IdentityName" ng-model="user.IdentityName" required class="form-control">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="Password" class="col-xs-2 control-label">密码</label>
                            <div class="col-xs-6">
                                <input type="password" placeholder="请输入密码" autocomplete="off" name="Password" ng-model="user.Password" required class="form-control">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" ng-model="user.RememberMe" name="RememberMe">
                                        <label for="RememberMe">记住我?</label>

                                    </label>
                                </div>
                            </div>
                        </div>


                        <div class="form-group">

                            <label class="col-xs-2 control-label"></label>
                            <div class="col-xs-6">
                                <button id="login_p" type="submit" class="btn btn-primary" ng-disabled="singleForm.$invalid"
                                        ng-click="dialogLogin()">
                                    <span class="glyphicon glyphicon-floppy-disk"></span>登录
                                </button>
                            </div>

                        </div>

                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a class="btn btn-default" href="~/"><span class="glyphicon glyphicon-share-alt"></span>返回首页</a>
            </div>
        </div>
    </div>

</div>